

#ifndef _BSP_USART_H
#define _BSP_USART_H

#ifdef __cplusplus
extern "C" {
#endif

#define BSP_USART_TX_PORT                     GPIOA
#define BSP_USART_TX_PIN                      GPIO_PIN_14
#define BSP_USART_TX_CLKENABLE()              __HAL_RCC_GPIOA_CLK_ENABLE()
#define BSP_USART_TX_FUN                      GPIO_AF_MODE_1


#define BSP_USART_RX_PORT                     GPIOA
#define BSP_USART_RX_PIN                      GPIO_PIN_3
#define BSP_USART_RX_CLKENABLE()              __HAL_RCC_GPIOA_CLK_ENABLE()
#define BSP_USART_RX_FUN                      GPIO_AF_MODE_1


#define BSP_USART_USART_BASE                  UART1
#define BSP_USART_USART_BAUDRATE              115200
#define BSP_USART_USART_CLKENABLE()           __HAL_RCC_UART1_CLK_ENABLE()
#define BSP_USART_USART_IRQ                   UART1_IRQn

#define  BSP_USART_TX_PDMA_CHANNEL           HAL_DMA_CHANNEL_USART1_TX

void bsp_usart_init(void);
void bsp_usart_sendbuff(uint8_t*buff,uint32_t len);
uint32_t bsp_usart_read(uint8_t *buff);

#ifdef __cplusplus
}
#endif

#endif /* __ZB32L03x_STARTERKIT_H */


